/**
 * select       查询维修人员类型
 * selectCount  总数查询
 * selectLimit  分页查询
 * selectCountLike 模糊查询总数
 * selectLikeLimit  分页模糊查询
 * idSelect     根据id获取维修人员类型信息
 * insert       添加维修人员类型
 * idUpdate     根据Id修改维修人员类型信息
 * delete       根据id删除维修人员类型
 */

const util = require("../util")
const table = "area"
const str = "name, description,job_number"
const like = " and name"

exports.select = (data) => util.select(str, table, util.selectTransition(data))

exports.selectCount = () => util.selectCount(table, "")

exports.selectLimit = (page, pagesize) =>
  util.selectLimit(str, table, "", page, pagesize)

exports.selectCountLike = (d) => util.selectCountLike(table, like, d)

exports.selectLikeLimit = (d, page, pagesize) =>
  util.selectLikeLimit(str, table, like, d, page, pagesize)

exports.idSelect = (id) => util.idSelect(str, table, id)

exports.insert = (data) =>
  util.insert(table, util.insertStr(data), util.insertTransition(data))

exports.idUpdate = (data, id) =>
  util.idUpdate(table, util.updateTransition(data), id)

exports.delete = (id) => util.delete(table, id)
